/*
 *  CSE 40166, Computer Graphics, Fall 2013
 *  Assignment 4, Part 2
 *
 *  File: OBJ_Parser.h
 *
 *  Kevin Sonnen
 *
 *  Description: Contains declaration of classes used to parse an obj file
 *
 */

#ifndef OBJ_PARSER_H
#define OBJ_PARSER_H

// Include libraries
#include "Object.h"

// Preprocessor definitions. Comment these in or out for different amounts of output
//#define VERBOSE
//define ERROR

// A class for parsing an obj file. Stores the computed geometry in an instance of the Object class
class OBJ_Parser {
	public:
		OBJ_Parser() {}
		bool parseOBJ(const std::string &filename);
		void readFace(const std::string &line);
		point readVertices(const std::string &line);
		point_2d readTextureCoord(const std::string &line);
		void readMaterial(const std::string &line);
		Object getObject();
	private:
		Object mObject;
};

#endif // OBJ_PARSER_H
